<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <meta name="Page-topic" content="ST-Open - Software" />
 <meta name="Description" content="ST-Open - Software" />
 <meta name="Keywords" content="ST-Open Software, Open Source, ST-Open, Software, library, libraries, free software, assembler, C" />
    <meta name="date" content="2009-05-08T00:00:00+00:00" />
 <meta name="robots" content="index,follow" />
 <meta name="revisit-after" content="14 days" />
 <meta name="generator" content="Bernhard Schornak, handwritten" />
 <style type="text/css"><!--@import "../../st.css";--></style>
 <link rel="SHORTCUT ICON" href="../../../../pics/favicon.ico" />
 <title>System Messages</title>
</head>
<body id="top">
<div class="pagehd">
<div id="menu">
<ul>
 <li><a href="../../../indexe.htm">Software</a></li>
 <li><a href="index.htm">Tutorials</a></li>
 <li><a href="../index.htm">Documentation</a></li>
 <li><a href="../alp.htm">alphabetical</a></li>
 <li><a href="../fct.htm">by Function</a></li>
</ul>
</div>
<div class="update">[2009-05-08]</div><div class="headpc"><img src="../../pics/ste.png" alt="SourceDoc Logo" width="75" height="75" border="0" /></div>
</div>
<div class="crlf1"></div>
&#160;&#160;&#160;<a href="../index.htm"><img src="../../../../pics/nav_up.png" alt="up" width="20" height="20" border="0" title="up" /></a>
&#160;&#160;&#160;<a href="0603.htm"><img src="../../../../pics/nav_bk.png" alt="previous" width="20" height="20" border="0" title="previous" /></a>
&#160;&#160;&#160;<a href="0800.htm"><img src="../../../../pics/nav_fw.png" alt="next" width="20" height="20" border="0" title="next" /></a>
<div class="text100">
<h1>Extended Spinbuttons</h1>
ST-Open's extended spinbuttons were upgraded, again. The new 64 bit decimal and hexadecimal types close the gap between yesterday and now. The new types and the default OS/2
 spinbuttons got a simple, field based management. Setting the parameters for each spinbutton once, then using them for the rest of your life by calling one function - STspn(),
 two mandatory and two optional parameters to pass - isn't a dream any longer. The good news: These spinbuttons do not forget their settings when the program is shut down. The
 bad news: You miss the fun to write a lot of repetitive calls that mess around with the API. These types are available:
<ul>
<li>32 bit formatted decimals with optional pseudo floating point (unsigned)</li>
<li>63 bit formatted decimals with optional pseudo floating point (signed)</li>
<li>08 bit formatted hexadecimals</li>
<li>16 bit formatted hexadecimals</li>
<li>32 bit formatted hexadecimals</li>
<li>64 bit formatted hexadecimals</li>
<li>32 bit formatted time (formats: SS.hh, MM:SS.hh, HH:MM:SS.hh, HH:MM:SS, HH:MM)</li>
<li>32 bit formatted date (formats: DD.MM.YYYY, YYYY-MM-DD)</li>
<li>Strings loaded from a field</li>
<li>31 bit unformatted decimals (default OS/2 spinbutton)</li>
<li>Strings loaded from a passed string array (default OS/2 spinbutton)</li>
</ul>
If you still don't believe it, here's a screenshot of all supported spinbutton types:
<div class="crlf1"></div>
<div class="box100"><img src="../../pics/spn.png" alt="ST-Open Spinbuttons" width="732" height="460" border="0" /></div>
<div class="crlf1"></div>
The default OS/2 spinbuttons don't need to be supported by STspn(). If you want to store the current number in a default numeric spinbutton, you should call STspn() with the
 command SPN_QUERY. Data of passed string arrays is managed by the spinbutton itself - STspn() doesn't want to know anything about it (except the resource ID of the spinbutton
 and it's type). All other spinbutton types are managed by STspn(). Your code is reduced to a single call when a SPBN_UPARROW or SPBN_DOWNARROW message is received. If you
 like to allow users typing funny stuff into the spinbutton's entryfield, one more call to STspn() is required for each SPBN_CHANGED (or SPBN_KILLFOCUS) message. And, of course,
 you need to initialise the spinbutton on creation. All together, you have to call STspn() at three places for each spinbutton (one more if you allow overtyping).
<div class="crlf1"></div>
</div>
<div class="crlf2"></div>
&#160;&#160;&#160;<a href="../index.htm"><img src="../../../../pics/nav_up.png" alt="up" width="20" height="20" border="0" title="up" /></a>
&#160;&#160;&#160;<a href="0603.htm"><img src="../../../../pics/nav_bk.png" alt="previous" width="20" height="20" border="0" title="previous" /></a>
&#160;&#160;&#160;<a href="0800.htm"><img src="../../../../pics/nav_fw.png" alt="next" width="20" height="20" border="0" title="next" /></a>
<div class="crlf1"></div>
</body>
</html>
